import request from '@/utils/request'

// 查询微信用户列表
export function listWxUser(query) {
  return request({
    url: '/car/wxUser/list',
    method: 'get',
    params: query
  })
}

// 查询微信用户详细
export function getWxUser(wxUserId) {
  return request({
    url: '/car/wxUser/' + wxUserId,
    method: 'get'
  })
}

// 新增微信用户
export function addWxUser(data) {
  return request({
    url: '/car/wxUser',
    method: 'post',
    data: data
  })
}

// 修改微信用户
export function updateWxUser(data) {
  return request({
    url: '/car/wxUser',
    method: 'put',
    data: data
  })
}

// 删除微信用户
export function delWxUser(wxUserId) {
  return request({
    url: '/car/wxUser/' + wxUserId,
    method: 'delete'
  })
}

// 用户密码重置
export function resetUserPwd(userId, password) {
  const data = {
    userId,
    password
  }
  return request({
    url: '/car/wxUser/resetPwd',
    method: 'post',
    data: data
  })
}

// 查询手机验证码
export function queryPhoneVerifyCode(phone) {
  return request({
    url: '/car/wxUser/queryPhoneVerifyCode?phone=' + phone,
    method: 'get',
  })
}
